#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
void my_len(char* left,char* right)
{
	while (left < right)
	{
		char ret = *left;
		*left = *right;
		*right = ret;
		left++;
		right--;
	}
}

int main()
{
	char arr[] = "abcdefg";
	int k = 0;
	scanf("%d\n", &k);
	int len = strlen(arr);
	k %= len;
	my_len(arr, arr + k-1);
	my_len(arr + k, arr+len - 1);
	my_len(arr, arr + len + 1);
	printf("%s\n", arr);
	return 0;
}